import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from "@dfeidao/atom-web/render/render";
import p001 from './p001';

export default async function a003(fd: IFeidaoAiBrowserComponent) {
	// todo
	const res = await nodejs<{ res: Array<{}>; c: number; }>('plan-cb/zj-000001/s001', {
		filter: {
			pn: 1,
			start_time: '',
			end_time: '',
			plan_name: '',
			take_effect: 1
		}
	});
	console.log('s1', res);
	render(fd, res, p001, 'p001', 'inner');

	const n1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="allin"]');
	n1.setAttribute('class', 'display-ib text-c ht30 l-ht30 cursor-p');
	const n2 = fd.data.node.querySelector<HTMLInputElement>('[data-id="no"]');
	n2.setAttribute('class', 'display-ib text-c ht30 l-ht30 cursor-p');
	const n3 = fd.data.node.querySelector<HTMLInputElement>('[data-id="yes"]');
	n3.setAttribute('class', 'display-ib text-c cursor-p ht30 l-ht30 bg-theme color-f');
}
